Refactor docs site: migrate to content-driven architecture#29
Open
juthing wants to merge 18 commits into
Open
Conversation
…) + new home page
…d) + inline lang script
…+ fix search-index
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…lict with esbuild 0.25) The plugin was already commented out in esbuild.config.mjs and not imported. Removing it from devDependencies resolves the npm ERESOLVE error on Vercel. Also update docs/TODO.md to reflect current state.
…, disable compress plugin - docs-search.ts + language-switcher.ts: 'lang' conflicts with HTMLElement.lang (public) - global.ts: ChangeColorEvent/ChangeDarkModeEvent don't overlap with CustomEvent, cast via unknown - eleventy.config.cjs: disable eleventy-plugin-compress (race condition with passthrough copy; Vercel handles CDN-level gzip/brotli anyway)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR completely restructures the Moddy documentation site from a catalog-based template system to a content-driven architecture. Content is now managed in a
/content/directory with JSON metadata and bilingual Markdown files, processed by Eleventy data scripts rather than copied into the site directory.Key Changes
Content Architecture
/content/directory structure: Articles, authors, labels, and legal pages now live in/content/with standardized JSON metadata + bilingual Markdown/site/site/about/and/site/site/legal/privacy.md(now in/content/legal/)_data/articles.js,_data/authors.js,_data/labels.js,_data/legalPages.jsto read and expose content to templatesLayout & Styling
layouts/article.html,layouts/author.html,layouts/label.html,layouts/legal.htmlfor pagination-based page generationarticle.css,author.css,label.cssfor article, author profile, and collection pagesglobal.csswith new frame layout system, i18n visibility rules, and Material Design 3 themingindex.htmlwith new hero section and language-aware content blocksBilingual Support
language-switcher.tsweb component for fr/en switching with localStorage persistence[data-lang]attribute selectors to show/hide language-specific contentapply-saved-lang.tsscript runs in<head>to prevent language flash_data/translations.jswith French/English UI stringsSearch & Discovery
docs-search.tsweb component with client-side search over/search-index.jsonsearch-index.njktemplate to generate JSON index from articleshydration-entrypoints/search.tsfor lazy-loading search componentPagination Templates
articles/article.njkgenerates/articles/{id}/pages fromarticlesdataauthors/author.njkgenerates/authors/{discord_id}/pagescollections/label.njkgenerates/collections/{id}/pageslegal/legalPage.njkgenerates/legal/{id}/pagesSample Content
Build & Config
eleventy.config.cjswith new data directory and pagination setupvercel.jsonwith redirects for old URLs and search index routecopy-docs.mjsto a no-op for backwards compatibility0.1.0Documentation
Implementation Details
fr.mdanden.mdseparately; templates render based ondata-langattributelit-islandfor hydhttps://claude.ai/code/session_018BHKMZneyDwF5GAR2gxu2Q